Skip to content

Update client to ES2022 #24324

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

Conversation

CraigMacomber
Copy link
Contributor

@CraigMacomber CraigMacomber commented Apr 10, 2025

Description

Update client to ES2022.

ES2022 saves over 2% (7309 bytes) on bundle size (measured using SharedTree bundles which includes all of the runtime shared tree uses as well).

Also building targeting ES2022 provides a better debug experience for JS private properties by not polyfilling them to weak map lookups.

Note that Fluid Framework has no validation that our dependencies don't already have dependencies on newer things, and no compatibility testing for older or less supported runtimes.

Tracked by AB#34388.

Breaking Changes

See changeset

Reviewer Guidance

The review process is outlined on this wiki page.

This needs special review based on potential impact on customers and our current lack of process for how to handle such updates.

@github-actions github-actions bot added area: build Build related issues base: main PRs targeted against main branch labels Apr 10, 2025
CraigMacomber added a commit that referenced this pull request Apr 22, 2025
## Description

Fix `AuthorizationError.claims` and `AuthorizationError.tenantId` so
they don't shadow the actual values from the super constructor that are
manually copied onto the `this` object when TypeScript introduces an ES6
class fields by targeting ES 2022.

Issue detected by #24324

## Reviewer Guidance

The review process is outlined on [this wiki
page](https://github.com/microsoft/FluidFramework/wiki/PR-Guidelines#guidelines).

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@CraigMacomber CraigMacomber marked this pull request as ready for review June 10, 2025 22:21
@Copilot Copilot AI review requested due to automatic review settings June 10, 2025 22:21
@CraigMacomber CraigMacomber requested a review from a team as a code owner June 10, 2025 22:21
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR aims to update the client to ES2022 to reduce bundle size and improve debugging of JS private properties. The changes include updating the target in the build configuration to ES2022 while leaving a few package tsconfig settings at ES2021 due to failing tests, and updating the changeset to reflect the new build target.

  • The build configuration in common/build/build-common/tsconfig.base.json now targets ES2022.
  • Three package tsconfig.json files continue to target ES2021 with comments noting test failures.
  • The changeset file documents the updated build target and its benefits.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
experimental/PropertyDDS/packages/property-properties/tsconfig.json Target remains ES2021 with notes on failing tests.
experimental/PropertyDDS/packages/property-dds/tsconfig.json Target remains ES2021 with notes on failing tests.
experimental/PropertyDDS/packages/property-common/tsconfig.json Target remains ES2021 with notes on failing tests.
common/build/build-common/tsconfig.base.json Updated target to ES2022.
.changeset/cyan-experts-nail.md Updates changeset message to document the migration benefits.
Comments suppressed due to low confidence (3)

experimental/PropertyDDS/packages/property-properties/tsconfig.json:13

  • The PR title and description indicate an update to ES2022, yet this tsconfig is still targeting ES2021 due to failing tests. Consider adding a reference to an issue or roadmap note that clarifies the plan for updating this package once the tests are fixed.
"target": "ES2021",

experimental/PropertyDDS/packages/property-dds/tsconfig.json:16

  • Although the PR aims to update to ES2022, this configuration remains at ES2021 with a comment about failing tests. Please consider documenting the strategy for addressing these failing tests or linking to a tracking issue.
"target": "ES2021",

experimental/PropertyDDS/packages/property-common/tsconfig.json:9

  • This tsconfig file continues to target ES2021 despite the ES2022 migration goal. Please add a comment or a reference to an issue that outlines your plan to update this as soon as the failing tests are resolved.
"target": "ES2021",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: build Build related issues area: dds: propertydds base: main PRs targeted against main branch changeset-present
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant